package com.flyme.common.rpc.spring.handler;

import com.flyme.common.rpc.support.ServiceMetadata;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liyanxin
 */
public class DefaultInvocationHandler extends AbstractInvocationHandler {
    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractInvocationHandler.class);
    private static final Map<Class<?>, Object> primitiveValue = new HashMap<Class<?>, Object>();

    static {
        primitiveValue.put(Boolean.TYPE, false);
        primitiveValue.put(Byte.TYPE, 0);
        primitiveValue.put(Character.TYPE, '\u0000');
        primitiveValue.put(Short.TYPE, 0);
        primitiveValue.put(Integer.TYPE, 0);
        primitiveValue.put(Long.TYPE, 0L);
        primitiveValue.put(Double.TYPE, 0.0d);
        primitiveValue.put(Float.TYPE, 0.0f);
    }

    @Override
    public Object doInvoke(ServiceMetadata serviceMetadata, Object[] args) {
        // 实现 rpc 调用
        return null;
    }
}
